<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/client/backgroundManagement/commons/global.jsp" %>
<!DOCTYPE html>
<html>
<head>
<%@ include file="/client/backgroundManagement/commons/basejs.jsp" %>
<meta http-equiv="X-UA-Compatible" content="edge" />
<title>日志</title>
    <script type="text/javascript">
    var dataGrid;
    $(function() {
        dataGrid = $('#dataGrid').datagrid({
            url : '${path }' + '/logController/dataGrid',
            striped : true,
            rownumbers : true,
            pagination : true,
            singleSelect : true,
            idField : 'id',
            sortName : 'id',
            sortOrder : 'asc',
            pageSize : 20,
            pageList : [ 10, 20, 30, 40, 50, 100, 200, 300, 400, 500 ],
            frozenColumns : [ [   {
                width : '120',
                title : '用户名称',
                field : 'USER_NAME',
                sortable : true
            } ,
            
             {
                width : '120',
                title : '日志类型',
                field : 'TYPE',
                sortable : true,
                formatter : function(value, row, index) {
                	switch (value) {
                    case "1":
                        return '登录日志';
                    }
                }
            },  {
                width : '120',
                title : '状态',
                field : 'STATUS',
                formatter : function(value, row, index) {
                	switch (value) {
                    case "1":
                        return '成功';
                    case "2":
                        return '失败';
                    }
                	}
            } ,
            
            {
                width : '460',
                title : '信息',
                field : 'INFO',
                sortable : true 
            }  ,
            
            {
                width : '460',
                title : '时间',
                field : 'CREATE_TIME',
                sortable : true 
            }  ] ],
            toolbar : '#toolbar'
        });
    });

 
 
 
    function searchFun() {
        dataGrid.datagrid('load', $.serializeObject($('#searchForm')));
    }
    function cleanFun() {
    	 
        $('#searchForm input').val('');
         
       dataGrid.datagrid('load', {});
    }
    
    function exportExcel() {
    	$('#searchForm').form('submit',{ 
    		
    	})
        
    }
    
    
    </script>
</head>
<body class="easyui-layout" data-options="fit:true,border:false">

    <div data-options="region:'center',border:false,title:'日志维护'">
        <table id="dataGrid" data-options="fit:true,border:false"></table>
    </div>
    
    <div data-options="region:'north',border:false" style="height: 30px; overflow: hidden;background-color: #fff">
        <form id="searchForm" action="/sddc/client/backgroundManagement/logController/exportLogExcel"/>
            <table>
                <tr>
					 <th>创建时间 </th>
					 <td>
                    <input name="startDate" placeholder="点击选择时间" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd'})" readonly="readonly" />至<input  name="endDate" placeholder="点击选择时间" onclick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd'})" readonly="readonly" />
 
                    <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" onclick="searchFun();">查询</a>
                    <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" onclick="cleanFun();">清空</a>
                    <a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-print',plain:true" onclick="exportExcel();">导出</a>
                    </td>
                    
                </tr>
            </table>
        </form>
    </div>
 <div id="toolbar" style="display: none;"></div>
 
</body>
</html>